﻿@model Orion.Models.HomeIndexViewModel
@{
    ViewBag.Title = "IRIS - Innranet - Hjálp";
    Layout = "~/Views/Shared/_WorkLayout.cshtml";
}

<section id="main_content">
<h1>Hjálp</h1>
<table>
<thead>
    <tr>
        <th>Dagsetning</th>
        <th>Titill</th>
        <th>Höf.</th>
        <th></th>
        <th></th>
    </tr>
</thead>
<tbody>
    @foreach ( var ab in Model.NewsArticle )
    {
    <tr>
        <td>@ab.ContentDate</td>
        <td>@Html.ActionLink( ab.Title, "GetContentById/"+@ab.ID, "WorkPageContent" )</td>
        <td>@ab.Author </td>  
        <td>@Html.ActionLink( "Breyta", "EditHelp/"+@ab.ID, "WorkPageContent" )</td>
       @if (ab.Valid == true)
       {
            <td>@Html.ActionLink("Eyða", "DisablePageContent/" + ab.ID, "WorkPageContent", new { onclick = "return confirm( 'Ertu viss um að þú viljir eyða hjálpinni?' )" })</td>
    
       }
       else if (ab.Valid == false)
       {
            <td>@Html.ActionLink("Birta", "EnablePageContent/" + ab.ID, "WorkPageContent", new { onclick = "return confirm( 'Ertu viss um að þú viljir birta hjálpina?' )" }) </td>    
       }
    </tr> 
    }

</tbody>

</table>


</section>